﻿using HiSport.Core;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HiSport.Core.Entity.HiSportEntity.Bas
{

    /// <summary>
    /// 场地会员信息表
    /// </summary>
    [SugarTable(null, "场馆会员表")]
    public class BasVenueMember : EntityTenant
    {

        /// <summary>
        /// 场馆ID
        /// </summary>
        [SugarColumn(ColumnDescription = "场馆ID")]
        [DefaultValue(0)]
        public long VenueId { get; set; }


        /// <summary>
        /// 会员名称
        /// </summary>
        [SugarColumn(ColumnDescription = "会员名称", Length = 20, DefaultValue = "")]
        [Required, MaxLength(20)]
        public string Name { get; set; }

        /// <summary>
        /// 头像
        /// </summary>
        [SugarColumn(ColumnDescription = "头像", Length = 512, DefaultValue = "")]
        [Required, MaxLength(512)]
        public string HeadUrl { get; set; }

        /// <summary>
        /// 性别
        /// </summary>
        [SugarColumn(ColumnDescription = "性别")]
        public GenderEnum Sex { get; set; }

        /// <summary>
        /// 生日
        /// </summary>
        [SugarColumn(ColumnDescription = "生日")]
        public  DateTime? Birthday { get; set; }

        /// <summary>
        /// 手机号
        /// </summary>
        [SugarColumn(ColumnDescription = "手机号", Length = 20, DefaultValue = "")]
        [Required, MaxLength(20)]
        public string Phone { get; set; }


        /// <summary>
        /// 余额
        /// </summary>
        [SugarColumn(ColumnDescription = "余额", ColumnDataType = "decimal(18,2)")]
        public decimal Money { get; set; }

        /// <summary>
        /// 积分
        /// </summary>
        [SugarColumn(ColumnDescription = "积分", ColumnDataType = "decimal(18,2)")]
        public decimal Integral { get; set; }

        /// <summary>
        /// 是否粉丝
        /// </summary>
        [SugarColumn(ColumnDescription = "是否粉丝")]
        public bool IsFans { get; set; }

        /// <summary>
        /// 会员等级Id
        /// </summary>
        [SugarColumn(ColumnDescription = "会员等级ID", DefaultValue = "0", IsNullable = false)]
        public long MemberGradeId { get; set; }

        /// <summary>
        /// 注册渠道
        /// </summary>
        [SugarColumn(ColumnDescription = "注册渠道")]
        public SignupSourceTypeEnum SignupSource { get; set; } = SignupSourceTypeEnum.Sys;
    }
}
